<?php
abstract class Unit{
	//得分
	abstract function bombardStrength();


	/*function addUnit(Unit $unit){
		throw new UnitException(get_class($this)." is a leaf");
	}

	function removeUnit(Unit $unit){
		throw new UnitException(get_class($this)." is a leaf");
	}*/

	function getComposite(){
		return null;
	}


	function textDump($num = 0){
		$ret = "";
		$pad = 4*$num;
		$ret .=sprintf("%{$pad}s","");
		$ret .=get_class($this).":";
		$ret .="bombard: ".$this->bombardStrength()."\n<BR/>";
		return $ret;
	}
}